#!/usr/bin/env php
<?php
$SOAR_DIR=getenv("SOAR_DIR");
if(empty($SOAR_DIR)) $SOAR_DIR="/opt/soar";
$SOAR_DIR="../..";
include "$SOAR_DIR/common/php/soar/soar.inc";

exit(main($argv));

function main($argv)
{/*{{{*/
    $sn=new svcnode("localhost:10000", svcnode::PERMANENT);

    $res=session($sn);
    if($res == false)
    {
        return 1;
    }

    $sn->close();

    return 0;
}/*}}}*/

function session($sn)
{/*{{{*/
    print "Test session\n";

    // create
    print "----------------------------------------\n";
    $sn->call("SESSION", "CREATE", $request); 

    // get
    print "----------------------------------------\n";
    $sn->call("SESSION", "GET", $request); 

    print "========================================\n";
}/*}}}*/
?>
